﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace TradingPlatform
{
    public class TradingGuiBase : Form
    {
        public delegate void OnCommConnected(string str);
        public delegate void OnCommDisconnected(string str);
        public delegate void OnCommDataRead(List<CommMessage> msg);

        public OnCommConnected mCommConnectedDelegate;
        public OnCommDisconnected mCommDisconnectedDelegate;
        public OnCommDataRead mCommDataReadDelegate;
        public TradingGuiBase()
        {
            mCommConnectedDelegate = new OnCommConnected(CommConnectedHandle);
            mCommDisconnectedDelegate = new OnCommDisconnected(CommDisconnectedHandle);
            mCommDataReadDelegate = new OnCommDataRead(CommDataReadHandle);
        }

        protected virtual void CommConnectedHandle(string str) { }
        protected virtual void CommDisconnectedHandle(string str) { }
        protected virtual void CommDataReadHandle(List<CommMessage> msg) { }

        public virtual void DisplayMessage(string str) { }
    }
}
